/*******************************************************************
 * author   :  Charlies-ls
 * Date     :  2021-09-26
 * Function :  dequeue base on list
 * Copyright (c) 2021. artestplay@outlook.com. All Rights Reserved.
 *******************************************************************/

#ifndef AXQUEUE__h
#define AXQUEUE__h
#include "com.h"
#include "ax_list.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct ax_queue ax_queue;
typedef struct _ax_list_node ax_queue_node;
struct ax_queue
{
    ax_list* list;
};
ax_queue* ax_queue_create(); 
void      ax_queue_destory(ax_queue*q);

void      ax_queue_push_front(ax_queue* q, void*obj);
void      ax_queue_push_back(ax_queue* q,  void*obj);
void*     ax_queue_pop_front(ax_queue* q);
void*     ax_queue_pop_back(ax_queue* q);
int       ax_queue_count(ax_queue* q);
void*     ax_queue_front(ax_queue* q);
void*     ax_queue_back(ax_queue* q);
#ifdef __cplusplus
}
#endif

#endif
